
var path = $("#path").val()
let brId=$("#Id_brId").val()
let csId=$("#Id_csId").val()
let price=$("#Id_price").val()
let price1=$("#id_my_price_b").val()
let price2=$("#id_my_price_e").val()
let cGear=$("#id_cGear").val()
let cSeat=$("#id_cSeat").val()
let cCus=$("#id_cCus").val()
let cAge=$("#id_cAge").val()
let cMileage=$("#id_cMileage").val()
let csName=$("#id_csName").val()
let brNames=$("#id_brName").val()
let likeStr=$("#id_likeStr").val()
let orderPrice=$("#id_orderPrice").val()
let orderFar=$("#id_orderFar").val()
let orderAge=$("#id_orderAge").val()
let pageNow=$("#id_pageNow").val()
let pageSize=$("#id_pageSize").val()
let pageNums=$("#id_pageNums").val()


function selectBR(obj) {

    if(obj.tabIndex==-1){

        window.location= path+"/carDetail/buyCar/carInfo.action?brId=&csId="+"&csName=&brName="+"&price="+price+"&price1="+price1+"&price2="+price2+
            "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+cCus+"&cAge="+cAge+"&cMileage="+cMileage+"&likeStr="+likeStr
            +"&orderFar="+orderFar+"&orderPrice="+orderPrice+"&orderAge="+orderAge+"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
    }else{
        window.location= path+"/carDetail/buyCar/carInfo.action?brId="+obj.tabIndex+"&csId=&csName=&brName="+obj.name+"&price="+price+"&price1="+price1+"&price2="+price2+
            "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+cCus+"&cAge="+cAge+"&cMileage="+cMileage+
            "&likeStr="+likeStr+"&orderFar="+orderFar+"&orderPrice="+orderPrice+"&orderAge="+orderAge+"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
    }
}


function selectCS(obj) {
    alert("a"+brId)

    if(obj.tabIndex==-1){
        window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csId=&csName="+"&brName="+brNames+"&price="+price+"&price1="+price1+"&price2="+price2+
            "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+cCus+"&cAge="+cAge+"&cMileage="+cMileage+"&likeStr="+likeStr+"&orderFar="
            +orderFar+"&orderPrice="+orderPrice+"&orderAge="+orderAge+"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
    }else{
        window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csId="+obj.tabIndex+"&csName="+obj.name+"&brName="+brNames+"&price="+price+"&price1="+price1+"&price2="+price2+
            "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+cCus+"&cAge="+cAge+"&cMileage="+cMileage+"&likeStr="+likeStr+"&orderFar="
            +orderFar+"&orderPrice="+orderPrice+"&orderAge="+orderAge+"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
    }
}

function selectPrice(obj){

    if(obj.tabIndex==-1){
        window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csId="+csId+"&price=&price1="+price1+"&price2="+price2+
            "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+cCus+"&cAge="+cAge+"&cMileage="+cMileage+"&likeStr="+likeStr+"&orderFar="+
            orderFar+"&orderPrice="+orderPrice+"&orderAge="+orderAge+"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
    }else{
        window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csName="+csName+"&brName="+brNames+"&csId="+csId+"&price="+obj.tabIndex+"&price1="+price1+"&price2="+price2+
            "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+cCus+"&cAge="+cAge+"&cMileage="+cMileage+"&likeStr="+likeStr+"&orderFar="
            +orderFar+"&orderPrice="+orderPrice+"&orderAge="+orderAge+"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
    }

}
function selectPriceMiddle(){
    let priceLow=$("#my_price_b").val();
    let priceHeigh=$("#my_price_e").val();
    window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csName="+csName+"&brName="+brNames+"&csId="+csId+"&price="+"&price1="+priceLow+"&price2="+priceHeigh+
        "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+cCus+"&cAge="+cAge+"&cMileage="
        +cMileage+"&likeStr="+likeStr+"&orderFar="+orderFar+"&orderPrice="+orderPrice+"&orderAge="+orderAge+"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
}


function selectGear(obj) {
    window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csName="+csName+"&brName="+brNames+"&csId="+csId+"&price="+price+"&price1="+price1+"&price2="+price2+
        "&cGear="+obj.name+"&cSeat="+cSeat+"&cCus="+ cCus+"&cAge="+cAge+"&cMileage="+cMileage+"&likeStr="+
        likeStr+"&orderFar="+orderFar+"&orderPrice="+orderPrice+"&orderAge="+orderAge+"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
}

function selectCus(obj){
    window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csName="+csName+"&brName="+brNames+"&csId="+csId+"&price="+price+"&price1="+price1+"&price2="+price2+
        "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+ obj.name+"&cAge="+cAge+"&cMileage="+cMileage+"&likeStr="+likeStr
        +"&orderFar="+orderFar+"&orderPrice="+orderPrice+"&orderAge="+orderAge+"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
}


function selectFar(obj){

    if(obj.tabIndex==-1){
        window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csName="+csName+"&brName="+brNames+"&csId="+csId+"&price="+price+"&price1="+price1+"&price2="+price2+
            "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+cCus+"&cAge="+cAge+"&cMileage=&likeStr="+likeStr+"&orderFar="+
            orderFar+"&orderPrice="+orderPrice+"&orderAge="+orderAge+"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
    }else{
        window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csName="+csName+"&brName="+brNames+"&csId="+csId+"&price="+price+"&price1="+price1+"&price2="+price2+
            "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+cCus+"&cAge="+cAge+"&cMileage="
            +obj.tabIndex+"&likeStr="+likeStr+"&orderFar="+orderFar+"&orderPrice="+orderPrice+"&orderAge="+orderAge+"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
    }

}

function selectAge(obj){
    if(obj.tabIndex==-1){
        window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csName="+csName+"&brName="+brNames+"&csId="+csId+"&price="+price+"&price1="+price1+"&price2="+price2+
            "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+cCus+"&cAge=&cMileage="+cMileage+"&likeStr="+likeStr+"&orderFar="+orderFar+"&orderPrice="+orderPrice+"&orderAge="+orderAge
            +"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
    }else{
        window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csName="+csName+"&brName="+brNames+"&csId="+csId+"&price="+price+"&price1="+price1+"&price2="+price2+
            "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+cCus+"&cAge="+ obj.tabIndex+"&cMileage="+cMileage+"&likeStr="+likeStr+"&orderFar="+orderFar+"&orderPrice="+orderPrice+"&orderAge="+orderAge
            +"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
    }

}

function selectSeat(obj){
    if(obj.tabIndex==-1){
        window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csName="+csName+"&brName="+brNames+"&csId="+csId+"&price="+price+"&price1="+price1+"&price2="+price2+
            "&cGear="+cGear+"&cSeat=&cCus="+cCus+"&cAge="+cAge+"&cMileage="+cMileage+"&likeStr="+likeStr+"&orderFar="+orderFar+"&orderPrice="+orderPrice+"&orderAge="+orderAge
            +"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
    }else{
        window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csName="+csName+"&brName="+brNames+"&csId="+csId+"&price="+price+"&price1="+price1+"&price2="+price2+
            "&cGear="+cGear+"&cSeat="+obj.tabIndex+"&cCus="+cCus+"&cAge="+cAge+"&cMileage="+cMileage+"&likeStr="+likeStr+"&orderPrice="+orderPrice+"&orderFar="+orderFar+"&orderPrice="+orderPrice+"&orderAge="+orderAge
            +"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
    }

}


function searchText() {
    let text=$("#searchText").val()
    window.location= path+"/carDetail/buyCar/carInfo.action?brId=&csName=&brName=&csId=&price=&price1=&price2=&cGear=&cSeat=&cCus=&cAge=&cMileage=&likeStr="
        +text+"&orderFar="+orderFar+"&orderPrice=" +orderPrice+"&orderAge="+orderAge+"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
    // window.location=path+"/carDetail/buyCar/carInfo.action?likeStr="+text;
}



let or_far = $("#Or_far").prop("checked");
let or_age = $("#Or_age").prop("checked");
let order_price = $("#Order_price").prop("checked");


function orderByPriceBox() {
    if(order_price==true){
        order_price=false

        window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csName="+csName+"&brName="+brNames+"&csId="+csId+"&price="+price+"&price1="+price1+"&price2="+price2+
            "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+cCus+"&cAge="+cAge+"&cMileage="+cMileage+"&likeStr="+likeStr+"&orderPrice=&orderFar="+orderFar+"&orderAge="+orderAge
            +"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
    }else{
        order_price=true
        orderPrice=-1
    }

}
function orderByPrice() {
    if(order_price==false){
        alert("请先勾选！")
        return
    }


    if (orderPrice==null ||orderPrice == 1) {
        orderPrice = -1;
    } else {
        orderPrice = 1;
    }

    window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csName="+csName+"&brName="+brNames+"&csId="+csId+"&price="+price+"&price1="+price1+"&price2="+price2+
        "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+cCus+"&cAge="+cAge+"&cMileage="+cMileage+"&likeStr="+likeStr+"&orderPrice="+orderPrice+"&orderFar="+orderFar+"&orderAge="+orderAge
        +"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
}

function orderByFarBox() {
    if(or_far==true){
        or_far=false
        window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csName="+csName+"&brName="+brNames+"&csId="+csId+"&price="+price+"&price1="+price1+"&price2="+price2+
            "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+cCus+"&cAge="+cAge+"&cMileage="+cMileage+"&likeStr="+likeStr+"&orderPrice="+orderPrice+"&orderFar=&orderAge="+orderAge
            +"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
    }else{
        or_far=true
        orderFar=-1;
    }

}

function orderByFar() {
    if(or_far==false){
        alert("请先勾选！")
        return
    }
    if(orderFar==null || orderFar == 1){
        orderFar=-1;
    }else{
        orderFar=1;
    }

    window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csName="+csName+"&brName="+brNames+"&csId="+csId+"&price="+price+"&price1="+price1+"&price2="+price2+
        "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+cCus+"&cAge="+cAge+"&cMileage="+cMileage+"&likeStr="+likeStr+"&orderPrice="+orderPrice+"&orderFar="+orderFar+"&orderAge="+orderAge
        +"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
}


function orderByAgeBox() {
    if(or_age==true){
        or_age=false
        window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csName="+csName+"&brName="+brNames+"&csId="+csId+"&price="+price+"&price1="+price1+"&price2="+price2+
            "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+cCus+"&cAge="+cAge+"&cMileage="+cMileage+"&likeStr="+likeStr+"&orderPrice="+orderPrice+"&orderFar="+orderFar+"&orderAge=&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
    }else {
        or_age=true
        orderAge=-1
    }
}
function orderByAge() {
    if(or_age==false){
        alert("请先勾选")
        return
    }

    if(orderAge==null || orderAge == 1){
        orderAge=-1;
    }else{
        orderAge=1;
    }


    window.location= path+"/carDetail/buyCar/carInfo.action?brId="+brId+"&csName="+csName+"&brName="+brNames+"&csId="+csId+"&price="+price+"&price1="+price1+"&price2="+price2+
        "&cGear="+cGear+"&cSeat="+cSeat+"&cCus="+cCus+"&cAge="+cAge+"&cMileage="+cMileage+"&likeStr="+likeStr+"&orderPrice="+orderPrice+"&orderFar="+orderFar+"&orderAge="+orderAge
        +"&pageNow="+1+"&pageSize="+pageSize+"&pageNums="+pageNums;
}
